<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: new_attribut.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

echo draw_form('attribute', 'categories.php', '', 'POST', 'id="attribute_form" onsubmit="return false;"').
	 draw_hidden_field('pID', $_GET['pid']);

$get_options = $db->db_query("SELECT
								products_options_id,
								products_options_name
							FROM
								".TABLE_PRODUCTS_OPTIONS."
							WHERE
								language_id = '".(int)$_SESSION['languages_id']."'
							ORDER BY
								products_options_name ASC");

if($get_options->_numOfRows){
	$opt  = '<select name="option" onchange="return xajax_getValue(this.value);">';
	$opt .= '	<option>-- Option w&auml;hlen --</option>';
	while(!$get_options->EOF) {
		$opt .= '<option value="'.$get_options->fields['products_options_id'].'">'.$get_options->fields['products_options_name'].'</option>';
		$get_options->MoveNext();
	}
	$opt .= '</select>';
}
echo '	<table width="100%">
			<tr>
				<span id="attributes_option">'.$opt.'</span> 
				<span id="attributes_value"></span>
			</tr>
			<tr>
				<td align="left">
					<div id="attributes_form"></div>
				</td>
				<td valign="top">
					<div id="price_option" style="display:none;margin-top:11px;">
						<select id="price_option" name="price_option" onchange="return xajax_preparePrefix(this.value);">
							<option value="surcharge">Preis als Aufschlag</option>
							<option value="total">Gesamtpreis</option>
						</select>
					</div>
				</td>
			</tr>
		</table>
	</form>';